import java.util.Scanner;
public class exp1 {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        int[] arr = new int[10];
        for(int i = 0;i < arr.length;i ++){
            arr[i] = input.nextInt();
        }
            System.out.println("最大值为" + getMax(arr));
            System.out.println("最小值为" + getMin(arr));
            System.out.println("奇数的个数为" + getEven(arr));
            System.out.println("偶数的个数为" + getOdd(arr));
            print(arr);
            seq(arr);
    }
        public static int getMax(int[] arr){
            int max = arr[0];
            for(int i = 0;i < arr.length;i ++)
                max = max > arr[i] ? max : arr[i];
            return max;
        }

        public static int getMin(int[] arr){
            int min = arr[0];
            for(int i = 1;i < arr.length;i ++)
                min = arr[i] < min ? arr[i] : min;

            return min;
        }

        public static void print(int[] arr){
            int sum = 0;
            for(int i = 0;i < arr.length;i ++){
                sum += arr[i];
                System.out.printf("%d ", sum);
            }
                System.out.println();
        }

        public static int getEven(int[] arr){
            int num = 0;
            for(int i = 0;i < arr.length;i ++)
                if(arr[i] % 2 == 1) num ++;
            return num;
        }

        public static int getOdd(int[] arr){
            int num = 0;
            for(int i = 0;i < arr.length;i ++)
                if(arr[i] % 2 == 0) num ++;
            return num;
        }

        public static void seq(int[] arr){
            for(int i = 0;i < arr.length;i ++){
                if(i == 0) continue;
                if(arr[i] == arr[i - 1] && arr[i] != arr[i + 1])
                    System.out.printf("%d ", arr[i]);
            }
        }
}
